package model;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

public class Chat_Group {
	
	

	private  int group_id;
	private String group_name;
	private String group_avater_type;
	private Blob group_avatar;
	private Timestamp  group_create_time;
	private int gour_max_number;
	private String group_nature;
	
//	public Chat_Group() {
//		Timestamp group_create_time = new Timestamp(System.currentTimeMillis());  
// 		group_create_time.setNanos(0);
// 		this.group_create_time=group_create_time;
//	}
//	public Chat_Group(int user_id) {    
//		group_create_time = new Timestamp(System.currentTimeMillis());  
//		group_create_time.setNanos(0);
////		con = BaseConnection.getConnection();
//	
//		String sql = "insert  into "+ TABLE_NAME+"(creation_time) values('"+group_create_time+"')";
//		String sql2 = "select id from "+TABLE_NAME+" where creation_time = '"+group_create_time+"'";
//		try {	
//			ps = con.prepareStatement(sql);
//			ps.executeUpdate();
//			ps = con.prepareStatement(sql2);
//			rs = ps.executeQuery();
//			rs.next() ;
//			group_id = rs.getInt(1);
//			System.out.println(group_id);
//			Chat_Group_member cgm = new Chat_Group_member(group_id,user_id);
//		} catch (SQLException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		
//	}
	
	

	public int getGroup_id() {
		return group_id;
	}

	public void setGroup_id(int group_id) {
		this.group_id = group_id;
	}

	public String getGroup_name() {
		return group_name;
	}

	public void setGroup_name(String group_name) {
		this.group_name = group_name;
	}

	public Blob getGroup_avatar() {
		return group_avatar;
	}

	public void setGroup_avatar(Blob group_avatar) {
		this.group_avatar = group_avatar;
	}

	public Timestamp getGroup_create_time() {
		return group_create_time;
	}

	public void setGroup_create_time(Timestamp group_create_time) {
		this.group_create_time = group_create_time;
	}

	public int getGour_max_number() {
		return gour_max_number;
	}

	public void setGour_max_number(int gour_max_number) {
		this.gour_max_number = gour_max_number;
	}

	public String getGroup_nature() {
		return group_nature;
	}

	public void setGroup_nature(String group_nature) {
		this.group_nature = group_nature;
	}

	public String getGroup_avater_type() {
		return group_avater_type;
	}

	public void setGroup_avater_type(String group_avater_type) {
		this.group_avater_type = group_avater_type;
	}
	
	
}
 
